
<script type="text/javascript">
$(function() {       
        $( "#divFrameTurnos" ).hide();

});   
function abrirdivFrameTurnos()
{
    if ($("#divFrameTurnos").is(':visible'))
     {
         $( "#divFrameTurnos" ).hide('600');
     }
    else
    {
      $( "#divFrameTurnos" ).show('600');   
    }
}
</script>


<?php
require_once ('ScriptTurnos.php');
require_once('CurlTurnos.php');
 //EnviarCurlTurnos(); 
?>
<table width="100%" class="searchPanels" style="background-image: url(images/Fondos/fr5.png);" align="center">
    <tr>
        <td>
            <table align="center" width="100%">
                <tr>
                    <td width="100%" align="center">
                        <table width="20%" align="center">
                            <tr>
                                <td align="center" width="100%" style=" background-color: #FED2ED; border-style: solid;border-color: purple;border-radius:5px;">
                                    <a  onclick="abrirdivFrameTurnos();" href="#"  >
                                        <input title="Turnos" type="button" style=" width: 20px; background-color: white;border-radius:5px; " /> 
                                        <font color="#E653DA"  size="3px" style=" font-weight: bold; text-decoration: none;">Turnos</font>
                                    </a>
                                </td>    
                            </tr>
                        </table>
                    </td>
                    <td align="right">
                        <a href="#" onclick="cerrarpageturnos();">
                            <img title="Cerrar" src="iconImage/cerrar.png" id="idCerrarTurnos" border="0"  width="20px" height="20px" class='cerrarTurnos'/>
                        </a>
                    </td>    
                    
                </tr>
                <tr>
                    <td width="100%" align="center">
                        <div  id="divFrameTurnos" style="width:900px; display: none; top:50px; left:0;">
                           <?

                            $seed = get_data("http://turnos.healthsolutions.com.ar/ht/seed");
                        //     echo "seed: " . $seed . "\n";
                            
                            // login data 
                           // $login = "mcerdeiro@mediturnos.com";
                            //$pass = "1234";
                            $login = "dellarosafabio@gmail.com";
                            $pass = "riverpla";
                            $key = md5($login . md5($pass) . $seed);
                            
                            // datos del paciente 
                            $user_email = "demo@mediturnos.com";
                            $user_fname = "Demo";
                            $user_name  = "Ejemplo";
                            
                            $addr = "http://turnos.healthsolutions.com.ar/ht/index/login:" .
                           // $addr = "http://turnos.healthsolution.com.ar/ht/index/login:" .
                            $login . "/key:" . $key . "/email:" . $user_email . "/fname:" .
                            $user_fname . "/name:" . $user_name;
                            //echo "open address: " . $addr . "\n";
                            
                          // echo get_data($addr, true);
                             //get_data($addr, true);
                            
                           ?>
                          <!--<iframe name="frameturnos" height="600px" src="http://turnos.healthsolutions.com.ar" width="100%" height="100%" align="center"> --> 
                               <iframe name="frameturnos" height="600px" src="<?echo $addr;?>" width="100%" height="100%" align="center">
                                <!--<meta  http-equiv="REFRESH" content="1;URL=http://turnos.healthsolutions.com.ar"/> -->
                             </iframe> 
                        </div>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>